Fix context switching between VCPUs belonging to the same domain. Setting
and then clearing the physical CPU bit in the cpuset bitmap is incorrect.
Signed-off-by: Keir Fraser <keir@xensource.com>
}
}
- set_bit(cpu, &n->domain->cpuset);
+ if ( p->domain != n->domain )
+ set_bit(cpu, &n->domain->cpuset);
+
write_ptbase(n);
__asm__ __volatile__ ( "lgdt %0" : "=m" (*n->arch.gdt) );
- clear_bit(cpu, &p->domain->cpuset);
+
+ if ( p->domain != n->domain )
+ clear_bit(cpu, &p->domain->cpuset);
percpu_ctxt[cpu].curr_ed = n;
}